import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/main',
    children:[
      {path:'/main',component:()=>import('../views/main/MainView.vue')},
      {path:'/label',component:()=>import('../views/lux/LabelView.vue')},
      {path:'/role',component:()=>import('../views/lux/RoleView.vue')},
    ]
  },
  {
    path: '/login',
    component: () => import('../views/LoginView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router